#include<iostream>
using namespace std;
template<typename T>
void Swap(T& x, T& y)
{
	T tmp = x;
	x = y;
	y = tmp;
}
int main()
{
	int a = 1;
	int b = 2;
	double c = 1.1;
	double d = 2.2;
	Swap(a, b);
	Swap(c, d);
	cout << a <<" "<< b << endl;
	cout << c <<" "<< d << endl;
}